# coding: utf-8
from application import db


class Gift(db.Model):
    __tablename__ = 'gift'

    id = db.Column(db.Integer, primary_key=True, info='ID')
    icon = db.Column(db.String(128), info='图标')
    title = db.Column(db.String(255), nullable=False, info='标题')
    num = db.Column(db.BigInteger, nullable=False, info='数量')
    created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
    updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
    is_delete = db.Column(db.Integer, nullable=False)
    cash = db.Column(db.BigInteger, nullable=False, info='价值')
    can_out = db.Column(db.Integer, nullable=False, info='是否可以提现')
    t_id = db.Column(db.Integer, nullable=False, info='类型')
    is_sale = db.Column(db.Integer, nullable=False, info='可以售卖')
    is_safebox = db.Column(db.Integer, nullable=False, info='是否可以存入安全箱')
